﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Server.DB
{
    interface IRepository<T> where T : class
    {
        IQueryable<T> All { get; }
        IQueryable<T> SearchFor(Expression<Func<T, bool>> predicate);
        T Find(int id);
        void Insert(T entity);
        void Update(T record);
        void Delete(int id);
        void Save();
    }
}
